import { defineConfig } from 'unocss'

export default defineConfig({
    // ...UnoCSS options
    rules: [
        ['flex-unset', { "flex": "unset !important" }],
        [/^mtb-(\d+)$/, ([, d]) => ({
            "margin-top": `${d / 4}rem`,
            "margin-bottom": `${d / 4}rem`
        })],
        [/^mlr-(\d+)$/, ([, d]) => ({
            "margin-left": `${d / 4}rem`,
            "margin-right": `${d / 4}rem`
        })],
        [/^mtbl-(\d+)$/, ([, d]) => ({
            "margin-top": `${d / 4}rem`,
            "margin-bottom": `${d / 4}rem`,
            "margin-left": `${d / 4}rem`,
        })],
        [/^mtbr-(\d+)$/, ([, d]) => ({
            "margin-top": `${d / 4}rem`,
            "margin-bottom": `${d / 4}rem`,
            "margin-right": `${d / 4}rem`
        })],
        [/^mblr-(\d+)$/, ([, d]) => ({
            "margin-bottom": `${d / 4}rem`,
            "margin-left": `${d / 4}rem`,
            "margin-right": `${d / 4}rem`
        })],
        [/^mtlr-(\d+)$/, ([, d]) => ({
            "margin-top": `${d / 4}rem`,
            "margin-left": `${d / 4}rem`,
            "margin-right": `${d / 4}rem`
        })],
    ],
})